package com.yeyaomai.dksns.flowis.servlet;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.yeyaomai.dksns.flowis.domain.flowisdetail.FlowisStatDetailDTO;
import com.yeyaomai.dksns.flowis.page.PageImplResult;
import com.yeyaomai.dksns.flowis.service.FlowisQueryService;

/**
 * @author dingtao@yeyaomai.com
 * 
 */
@Controller
@RequestMapping("flowis.htm")
public class FlowisStatController {

	public static Logger logger = LoggerFactory.getLogger(PageImplResult.class);
	
	@Autowired
	FlowisQueryService  flowisQueryService;
	
	/**
	 * 让前端调用   存放数据     数据自动映射
	 * @param request
	 * @param response
	 */
	@RequestMapping(method = RequestMethod.GET)
	@ResponseBody
	public void saveFlowisInfo(HttpServletRequest request,
			HttpServletResponse response,FlowisStatDetailDTO  dto) {
		
		// 写入  cookie
		
		Cookie cookie  =new Cookie("","");
		
		//
		response.addCookie(cookie);
		
		// TODO  直接放   mongodb 还是先cache 后 batch 
		

	}
}
